package com.example.design.mediator;

/**
 * 窗帘， 具体同事类
 * @author hej
 * @date 2022/11/4 17:29
 */
public class Curtains extends Colleague {
    @Override
    void sendMessage(int stateChange) {
        this.getMediator().getMessage(stateChange,this.getName());
    }

    public Curtains(Mediator mediator, String name) {
        super(mediator, name);
        mediator.register(name,this);
    }

    public void upCurtains(){
        System.out.println("窗帘在上升。。。。");
    }

    public void downCurtains(){
        System.out.println("窗帘在下降。。。。");
    }
}
